package com.letfox.user.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.letfox.user.dao.AuthorityDao;
import com.letfox.user.model.UAuthority;
import com.letfox.user.service.AuthorityService;

@Service
public class AuthorityServiceImpl implements AuthorityService {

	@Autowired
	private AuthorityDao authorityDao;
	
	@Override
	public int save(UAuthority authority) {
		return authorityDao.insert(authority);
	}

	@Override
	public int update(UAuthority authority) {
		return authorityDao.update(authority);
	}

	@Override
	public int deleteById(Long id) {
		return authorityDao.deleteById(id);
	}

	@Override
	public int deleteByIds(String ids) {
		return authorityDao.deleteByIds(ids);
	}

	@Override
	public UAuthority getById(Long id) {
		return authorityDao.selectById(id);
	}

	@Override
	public List<UAuthority> getList(Map<String, Object> params) {
		return authorityDao.selectList(params);
	}

}
